<template>
  <div class="block_main blue-tit">
    <!-- <div class="nytit">首页&gt;通知/督办</div> -->
    <el-row style="padding-top: 10px">
      <el-col :span="24" style="padding:0 5px">
        <el-card>
          <!-- 筛选 -->
          <!-- <el-form style="padding:20px 20px 0" :inline="true" :model="region" class="demo-form-inline" size="small">


            <el-form-item label="时间">
              <el-date-picker v-model="region.startTime" value-format="yyyy-MM-dd" type="date" placeholder="开始日期">
              </el-date-picker>
              <el-date-picker v-model="region.endTime" value-format="yyyy-MM-dd" type="date" placeholder="结束日期">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="部门">
              <el-select v-model="region.target" placeholder="选择部门分类">
                <el-option v-for="(list,index) in targetArr" :label="list.name" :value="list.name"
                           :key="index"></el-option>

              </el-select>
            </el-form-item>
            <el-form-item label="状态">

              <el-select v-model="region.listStatus" placeholder="状态">
                <el-option label="全部" value="-1"></el-option>
                <el-option label="已完成" value="1"></el-option>
                <el-option label="已出方案" value="2"></el-option>
                <el-option label="正在进行" value="3"></el-option>
                <el-option label="已超时" value="4"></el-option>

              </el-select>
              <el-button type="primary">查询</el-button>
              <el-button type="success">新增事件</el-button>
            </el-form-item>

          </el-form> -->
          <!-- 表格内容 -->
          <el-table :data="tableData" style="width: 100%" v-loading="loading">

            <el-table-column type="index" width="70" label="序号" fixed>
            </el-table-column>
            <el-table-column prop="title" label="诉求分类" :show-overflow-tooltip="true" fixed>
            </el-table-column>

            <el-table-column prop="target" label="处理部门">
            </el-table-column>
            <el-table-column prop="addtime" label="提问时间">

            </el-table-column>

            <el-table-column prop="accepttime" label="受理时间" width="180">
            </el-table-column>

            <el-table-column prop="status" label="状态" width="80" v-if="isShow">
              <template slot-scope="scope">
                <span v-if="scope.row.status == 1" class="warn">正在进行</span>
                <span v-else-if="scope.row.status == 2">已出方案</span>
                <span v-else-if="scope.row.status == 3" class="green">已完成</span>
                <span v-else-if="scope.row.status == 4" class="red">已超时</span>
              </template>
            </el-table-column>
            <el-table-column prop="accepttime" label="评价" width="100">
            </el-table-column>
            <el-table-column label="操作" fixed="right">
              <template slot-scope="scope">
                <el-button @click="seeDetail(scope.row,scope.$index)" type="text" size="mini">
                  查看
                </el-button>
                <el-button @click="seeDetail(scope.row,scope.$index)" type="text" size="mini">
                  删除
                </el-button>
                <el-button @click="seeDetail(scope.row,scope.$index)" type="text" size="mini">
                  修改
                </el-button>
              </template>
            </el-table-column>
          </el-table>

          <div class="zpage">
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage"
              :page-size.sync="pagesize"
              layout="total, prev, pager, next, jumper"
              :total.sync="pagetotal">
            </el-pagination>
          </div>
        </el-card>
      </el-col>
    </el-row>


  </div>
</template>
<script>
  import actionurl from '@/assets/js/actionurl.js'


  export default {
    components: {
     
    },
    data() {
      return {
        dialogVisible: false,
        isShow: false,
        tableData: [],
        region: {
          startTime: '',
          endTime: '',
          target: '',
          listStatus: '-1'
        },
        layerForm: {},
        targetArr: [],
        target: '',
        status: '',
        currentPage: 1,
        pagesize: 10,
        pagetotal: 10000,
        moveTarget: '',
        movegname: '',
        loading: false,
        MessageGroupArr: ''
      }

    },
    methods: {
    
      handleSizeChange(val) {
        console.log(`每页 ${val} 条`);
      },
      handleCurrentChange(val) {
        // this.currentPage == val;
        console.log(this.currentPage);
       
      },
    
      getList() {
          var _this = this;
            actionurl.getUserMseeageList(
            {
              pageNum:_this.pagesize,
              pageOn:_this.currentPage,
            },
            function(re) {
                console.log(re);
                _this.tableData = re.data;
                _this.pagetotal = re.count;
            })
      },
      seeDetail(row){
        console.log(row);
        this.$router.push({ path: "/com/comQuestionDetail/"+row.question_num });

      }

    },
    mounted() {

    },
    created() {
        this.getList();
    },
  }
</script>
<style scoped lang="scss">

</style>
